gtk4.git
2 years agomedia-gstreamer: Port to GdkGLTextureBuilder
Benjamin Otte [Mon, 24 Apr 2023 20:22:07 +0000 (22:22 +0200)]
media-gstreamer: Port to GdkGLTextureBuilder

This is a rudimentary port that does not take advantage of all the cool
new formats that we could support now.

2 years agotestsuite: Use GLTextureBuilder
Benjamin Otte [Mon, 24 Apr 2023 20:10:06 +0000 (22:10 +0200)]
testsuite: Use GLTextureBuilder

2 years agoglarea: Port to GdkGLTextureBuilder
Benjamin Otte [Mon, 24 Apr 2023 20:02:10 +0000 (22:02 +0200)]
glarea: Port to GdkGLTextureBuilder

2 years agotexturebuilder: Pass the destroy notify to the build() function
Benjamin Otte [Mon, 24 Apr 2023 19:56:49 +0000 (21:56 +0200)]
texturebuilder: Pass the destroy notify to the build() function

This is more compatible with bindings that want to create per-object
callbacks and not have their callbacks reused over different build()
calls.

2 years agotexturebuilder: Add ::format and ::has-mipmap
Benjamin Otte [Mon, 24 Apr 2023 12:36:38 +0000 (14:36 +0200)]
texturebuilder: Add ::format and ::has-mipmap

We were trying to deduce that previously. Now we have explicit API

2 years agogdk: Add GdkGLTextureBuilder
Benjamin Otte [Mon, 24 Apr 2023 04:04:26 +0000 (06:04 +0200)]
gdk: Add GdkGLTextureBuilder

Building GL textures is complicated, so create an object to make them.

So far, this object just contains the functionality of
gdk_gl_texture_new(), but that will change in the future.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Thu, 27 Apr 2023 04:37:12 +0000 (04:37 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Fix the build with clang

See merge request GNOME/gtk!5876

2 years agoMerge branch 'wip/otte/gl-version' into 'main'
Benjamin Otte [Thu, 27 Apr 2023 00:39:19 +0000 (00:39 +0000)]
Merge branch 'wip/otte/gl-version' into 'main'

Make sure highest possible version GLContext is created

See merge request GNOME/gtk!5870

2 years agowgl: Improve error messages when GL init fails
Benjamin Otte [Wed, 26 Apr 2023 16:08:59 +0000 (18:08 +0200)]
wgl: Improve error messages when GL init fails

In particular, we want to get the GL version, when the Windows box/VM
has an unsuitable GL implementation.

This is somewhat helpful in analyzing failures to bring up GL on
machines where users claim GL does work.

2 years agowgl: Create context during WGL initialization
Benjamin Otte [Wed, 26 Apr 2023 04:16:37 +0000 (06:16 +0200)]
wgl: Create context during WGL initialization

This way, we can realize it and either print success information about
it or return NULL if that fails.

This makes it more likely that we fail early, which means we can then
initialize EGL.

2 years agowin32: Get rid of display->gl_version
Benjamin Otte [Wed, 26 Apr 2023 03:54:45 +0000 (05:54 +0200)]
win32: Get rid of display->gl_version

We can just query the display's GL context.

And it's not used otherwise anymore.

2 years agowin32: Refactor context creation
Benjamin Otte [Wed, 26 Apr 2023 02:17:32 +0000 (04:17 +0200)]
win32: Refactor context creation

This refactor achieves the following:

 * check GL version against proper matching context version
   In particular, for legacy contexts, we now actually check
 * make sure the actual version is set, even for legacy contexts
 * make sure set_is_legacy() is set properly

2 years agogdk: Add workaround for Visual Studio
Benjamin Otte [Tue, 25 Apr 2023 21:18:36 +0000 (23:18 +0200)]
gdk: Add workaround for Visual Studio

apparently casting something to itself makes it not constant.

2 years agomac: Properly set GLContext.is_legacy()
Benjamin Otte [Tue, 25 Apr 2023 20:50:00 +0000 (22:50 +0200)]
mac: Properly set GLContext.is_legacy()

2 years agoglcontext: assert all contexts set the version on realize()
Benjamin Otte [Tue, 25 Apr 2023 20:45:34 +0000 (22:45 +0200)]
glcontext: assert all contexts set the version on realize()

Now that all contexts do that, insist that they keep doing it.

And because they keep doing it, we can support querying the GL version
from gdk_gl_context_get_version() without requiring the context to be
made current.

2 years agomac: Try all different OpenGL profiles
Benjamin Otte [Tue, 25 Apr 2023 20:16:27 +0000 (22:16 +0200)]
mac: Try all different OpenGL profiles

.. and pick the best one that is supported.

Also make sure that the resulting context has at least the desired
version, otherwise bail.

2 years agoglcontext: Compute matching version the simple way
Benjamin Otte [Tue, 25 Apr 2023 19:45:31 +0000 (21:45 +0200)]
glcontext: Compute matching version the simple way

Do it all in one function instead of requiring two different ones.

2 years agowin32: Make sure highest possible GL version is created
Benjamin Otte [Tue, 25 Apr 2023 19:55:16 +0000 (21:55 +0200)]
win32: Make sure highest possible GL version is created

Mirror EGL here.

2 years agowin32: Pass the version properly through the creation stack
Benjamin Otte [Tue, 25 Apr 2023 19:30:32 +0000 (21:30 +0200)]
win32: Pass the version properly through the creation stack

We were using major/minor instead of GdkGLVersion.

And we were resetting back to 0 and ignoring the required min version
which we should not do.

2 years agoglx: Make sure highest possible GL version is created
Benjamin Otte [Tue, 25 Apr 2023 19:24:04 +0000 (21:24 +0200)]
glx: Make sure highest possible GL version is created

Mirror EGL here.

2 years agoegl: Make sure highest possible GL version is created
Benjamin Otte [Tue, 25 Apr 2023 18:08:33 +0000 (20:08 +0200)]
egl: Make sure highest possible GL version is created

The EGL spec states:

    The context returned must be the specified version, or a later
    version which is backwards compatible with that version.
    Even if a later version is returned, the specified version
    must correspond to a defined version of the client API.

GTK has so far been relying on EGL implementations returning a
later version, because that is what Mesa does.
But ANGLE does not do that and only provides the minimum version, which
means Windows EGL has been forced to use a lower EGL version for no
reason.

So fix this and try versions in order from highest to lowest.

2 years agogdk: Move GdkGLAPI enum into gdkenums.h
Benjamin Otte [Tue, 25 Apr 2023 18:04:13 +0000 (20:04 +0200)]
gdk: Move GdkGLAPI enum into gdkenums.h

2 years agoglcontext: Use GdkGLVersion elsewhere
Benjamin Otte [Tue, 25 Apr 2023 17:32:12 +0000 (19:32 +0200)]
glcontext: Use GdkGLVersion elsewhere

... and add a convenience API to generate GL versions from strings to
make the gdk_gl_context_check() API nicer.

2 years agogdk: Introduce GdkGLVersion
Benjamin Otte [Tue, 25 Apr 2023 17:17:07 +0000 (19:17 +0200)]
gdk: Introduce GdkGLVersion

... and use it.

Makes the code simpler.

2 years agowin32: Remove an outdated check
Benjamin Otte [Tue, 25 Apr 2023 20:40:59 +0000 (22:40 +0200)]
win32: Remove an outdated check

We require GL 3.0, so checking for less than 2.0 makes no sense anymore.

2 years agoFix a crash
Matthias Clasen [Wed, 26 Apr 2023 22:09:18 +0000 (00:09 +0200)]
Fix a crash

Fix an oversight from c87b193d2abe1.

2 years agoMerge branch 'wip/otte/treelistmodel-madness' into 'main'
Benjamin Otte [Wed, 26 Apr 2023 22:06:40 +0000 (22:06 +0000)]
Merge branch 'wip/otte/treelistmodel-madness' into 'main'

treelistmodel: Be safer during collapsing

See merge request GNOME/gtk!5875

2 years agoFix the build with clang
Matthias Clasen [Wed, 26 Apr 2023 21:54:43 +0000 (23:54 +0200)]
Fix the build with clang

This broke our macos ci.

2 years agotreelistmodel: Delay notifies from TreeListRow
Benjamin Otte [Wed, 26 Apr 2023 21:40:56 +0000 (23:40 +0200)]
treelistmodel: Delay notifies from TreeListRow

Don't notify during destruction, notify afterwards.
This way we don't call into user code from a half-destructed node.

Note that this changes the order in which those notifies happen when
collapsing a large tree: From parent node before child nodes to child
nodes before parent node.

No actual use case for this, just thought it would be safer.

2 years agotreelistmodel: Be safer during collapsing
Benjamin Otte [Wed, 26 Apr 2023 21:30:37 +0000 (23:30 +0200)]
treelistmodel: Be safer during collapsing

While we are collapsing a subtree, some signal handlers may not be
disconnected while we are doing this. By adding this check and not
giving those nodes no longer access to the model, we can stop it from
modifying it while we are trying to collapse stuff.

Fixes some crashes in gnome-builder.

2 years agoMerge branch 'wip/otte/surface-surgery' into 'main'
Benjamin Otte [Wed, 26 Apr 2023 21:03:24 +0000 (21:03 +0000)]
Merge branch 'wip/otte/surface-surgery' into 'main'

refactor internal surface API

See merge request GNOME/gtk!5846

2 years ago3to4: Fix we said we replace doubles with doubles,
Daniel Boles [Wed, 26 Apr 2023 20:30:10 +0000 (21:30 +0100)]
3to4: Fix we said we replace doubles with doubles,

when what we are replacing are ints!

2 years agodisplay: Remove ::create_surface() vfunc
Benjamin Otte [Fri, 21 Apr 2023 03:41:48 +0000 (05:41 +0200)]
display: Remove ::create_surface() vfunc

Instead, have a toplevel_type and popup_type in GdkDisplay and
call g_object_new() with those types.

2 years agowayland: Set default title in toplevel_init()
Benjamin Otte [Fri, 21 Apr 2023 20:10:00 +0000 (22:10 +0200)]
wayland: Set default title in toplevel_init()

2 years agomacos: Add surface from ::constructed()
Benjamin Otte [Fri, 21 Apr 2023 19:59:31 +0000 (21:59 +0200)]
macos: Add surface from ::constructed()

2 years agogdk: Remove GDK_SURFACE_DRAG enum member
Benjamin Otte [Fri, 21 Apr 2023 19:47:53 +0000 (21:47 +0200)]
gdk: Remove GDK_SURFACE_DRAG enum member

I want to remove the whole enum, but this value was used all over the
place. So removing it first ensures I didn't forget anything.

2 years agowayland: Create drag surface directly
Benjamin Otte [Fri, 21 Apr 2023 19:44:55 +0000 (21:44 +0200)]
wayland: Create drag surface directly

... instead of going through create_surface().

2 years agowayland: Remove struct member
Benjamin Otte [Fri, 21 Apr 2023 18:54:25 +0000 (20:54 +0200)]
wayland: Remove struct member

It's unused.

2 years agox11: Add private gdk_x11_drag_surface_new()
Benjamin Otte [Fri, 21 Apr 2023 18:52:58 +0000 (20:52 +0200)]
x11: Add private gdk_x11_drag_surface_new()

... and use it.

2 years agox11: Set frame clock in ::constructed
Benjamin Otte [Fri, 21 Apr 2023 18:43:54 +0000 (20:43 +0200)]
x11: Set frame clock in ::constructed

2 years agox11: Move window construction to ::constructed()
Benjamin Otte [Fri, 21 Apr 2023 18:36:07 +0000 (20:36 +0200)]
x11: Move window construction to ::constructed()

2 years agobroadway: Create gdk_broadway_drag_surface_new()
Benjamin Otte [Fri, 21 Apr 2023 03:40:19 +0000 (05:40 +0200)]
broadway: Create gdk_broadway_drag_surface_new()

... and use it.

2 years agowin32: Create gdk_win32_draw_surface_new()
Benjamin Otte [Fri, 21 Apr 2023 03:37:49 +0000 (05:37 +0200)]
win32: Create gdk_win32_draw_surface_new()

... and use it.

2 years agomacos: Set frame clock in ::constructed
Benjamin Otte [Fri, 21 Apr 2023 03:35:45 +0000 (05:35 +0200)]
macos: Set frame clock in ::constructed

2 years agobroadway: Set frame clock in ::constructed
Benjamin Otte [Fri, 21 Apr 2023 03:29:05 +0000 (05:29 +0200)]
broadway: Set frame clock in ::constructed

... instead of passing it to g_object_new().

2 years agobroadway: Move surface init code into ::constructed()
Benjamin Otte [Fri, 21 Apr 2023 03:21:43 +0000 (05:21 +0200)]
broadway: Move surface init code into ::constructed()

2 years agowin32: Set frame clock in constructed()
Benjamin Otte [Fri, 21 Apr 2023 02:59:48 +0000 (04:59 +0200)]
win32: Set frame clock in constructed()

... instead of passing it as construct argument.

2 years agowayland: Construct the frame clock in the surface
Benjamin Otte [Thu, 20 Apr 2023 21:29:17 +0000 (23:29 +0200)]
wayland: Construct the frame clock in the surface

... instead of passing it to g_object_new().

2 years agosurface: Make gdk_surface_set_frame_clock() available
Benjamin Otte [Thu, 20 Apr 2023 21:26:49 +0000 (23:26 +0200)]
surface: Make gdk_surface_set_frame_clock() available

... to backends.

That way, frame clocks can be constructed by the backends' surface
implementations and dont need to be passed in as construct arguments.

Also add an assertion that they are indeed constructed.

2 years agomacos: Move native window creation to ::constructed()
Benjamin Otte [Thu, 20 Apr 2023 15:38:57 +0000 (17:38 +0200)]
macos: Move native window creation to ::constructed()

That way, it doesn't need a specific init function.

Also chain up last, so that the generic initialization code in
GdkSurface::constructed can access a fully initialized macos surface.

2 years agomacos: Don't pass sizes to macos_surface_new()
Benjamin Otte [Tue, 18 Apr 2023 14:41:05 +0000 (16:41 +0200)]
macos: Don't pass sizes to macos_surface_new()

They're 0, 0, 100, 100 always, so just use those values everywhere.

2 years agomacos: Create drag surface directly
Benjamin Otte [Tue, 18 Apr 2023 14:38:57 +0000 (16:38 +0200)]
macos: Create drag surface directly

Do not go via macos_surface_new().

2 years agomacos: Move construction stuff into ::constructed
Benjamin Otte [Tue, 18 Apr 2023 14:37:43 +0000 (16:37 +0200)]
macos: Move construction stuff into ::constructed

2 years agomacos: toplevels have no parent
Benjamin Otte [Tue, 18 Apr 2023 14:15:59 +0000 (16:15 +0200)]
macos: toplevels have no parent

2 years agowin32: Move surface init code into ::constructed()
Benjamin Otte [Mon, 17 Apr 2023 02:27:11 +0000 (04:27 +0200)]
win32: Move surface init code into ::constructed()

2 years agowin32: Abort on error
Benjamin Otte [Mon, 17 Apr 2023 02:16:50 +0000 (04:16 +0200)]
win32: Abort on error

Returning NULL from a function that must not return NULL is not a good
idea.

2 years agowin32: Remove outdated debug messages
Benjamin Otte [Mon, 17 Apr 2023 02:11:16 +0000 (04:11 +0200)]
win32: Remove outdated debug messages

They are not needed anymore as they print stuff that's no decided in
that function anymore.

2 years agowin32: Move toplevel signal into the toplevel class
Benjamin Otte [Mon, 17 Apr 2023 02:07:43 +0000 (04:07 +0200)]
win32: Move toplevel signal into the toplevel class

2 years agobroadway: Pass parent as a construct argument
Benjamin Otte [Mon, 17 Apr 2023 00:32:13 +0000 (02:32 +0200)]
broadway: Pass parent as a construct argument

2 years agox11: Get rid of sizes when constructing surfaces
Benjamin Otte [Mon, 17 Apr 2023 00:17:03 +0000 (02:17 +0200)]
x11: Get rid of sizes when constructing surfaces

Just call XCreateWindow with 0, 0, 1, 1 size.

2 years agox11: Remove unused variable
Benjamin Otte [Sun, 16 Apr 2023 23:34:24 +0000 (01:34 +0200)]
x11: Remove unused variable

2 years agowayland: Move surface initialization into constructed()
Benjamin Otte [Sun, 16 Apr 2023 23:26:45 +0000 (01:26 +0200)]
wayland: Move surface initialization into constructed()

That way, it doesn't ned a specific init function.

Also chain up last, so that the generic initialization code can access a
fully initialized wayland surface.

2 years agowayland: Move toplevel-specific code into the toplevel
Benjamin Otte [Sun, 16 Apr 2023 23:26:16 +0000 (01:26 +0200)]
wayland: Move toplevel-specific code into the toplevel

The display->toplevels tracking belongs to GdkWAylandToplevel.

2 years agodisplay: Remove x/y/w/h from create_surface()
Benjamin Otte [Sat, 15 Apr 2023 18:06:36 +0000 (20:06 +0200)]
display: Remove x/y/w/h from create_surface()

2 years agoMerge branch 'application-signal-cleanup' into 'main'
Matthias Clasen [Wed, 26 Apr 2023 13:11:43 +0000 (13:11 +0000)]
Merge branch 'application-signal-cleanup' into 'main'

application: Clean up signal handlers

See merge request GNOME/gtk!5872

2 years agoapplication: Clean up signal handlers
Matthias Clasen [Wed, 26 Apr 2023 12:09:44 +0000 (14:09 +0200)]
application: Clean up signal handlers

This is the right thing to do and might help for #5775.

2 years agoMerge branch 'win32-warnings' into 'main'
Matthias Clasen [Wed, 26 Apr 2023 06:58:09 +0000 (06:58 +0000)]
Merge branch 'win32-warnings' into 'main'

Fix some win32 warnings

See merge request GNOME/gtk!5868

2 years agoMerge branch 'pathbar-webdav-root' into 'main'
Matthias Clasen [Wed, 26 Apr 2023 06:50:10 +0000 (06:50 +0000)]
Merge branch 'pathbar-webdav-root' into 'main'

pathbar: Handle webdav where is the root is a path

Closes #2866

See merge request GNOME/gtk!5830

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 26 Apr 2023 06:49:32 +0000 (06:49 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gsk: Don't misuse bitwise operators

See merge request GNOME/gtk!5869

2 years agoMerge branch 'modelbutton-no-click-outside' into 'main'
Matthias Clasen [Wed, 26 Apr 2023 05:56:31 +0000 (05:56 +0000)]
Merge branch 'modelbutton-no-click-outside' into 'main'

gtkmodelbutton: Ignore releases outside of the button

Closes #5760

See merge request GNOME/gtk!5852

2 years agoUpdate Galician translation
Fran Dieguez [Tue, 25 Apr 2023 23:22:20 +0000 (23:22 +0000)]
Update Galician translation

(cherry picked from commit 7470bc01f25123ed57e36eaf4e2a5c98203a03da)

2 years agogtkmodelbutton: Ignore releases outside of the button
Sebastian Keller [Thu, 20 Apr 2023 22:31:53 +0000 (00:31 +0200)]
gtkmodelbutton: Ignore releases outside of the button

This is also how regular buttons behave. Otherwise releasing on a
different menu item would register a click on the item that was
originally pressed. In these cases it is better to not register a click
at all.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5760
2 years agogsk: Don't misuse bitwise operators
Matthias Clasen [Tue, 25 Apr 2023 14:43:02 +0000 (16:43 +0200)]
gsk: Don't misuse bitwise operators

We should use && for booleans, not &=.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Tue, 25 Apr 2023 12:48:13 +0000 (12:48 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gsk: Don't misuse bitwise operators

See merge request GNOME/gtk!5867

2 years agogtk/win32: fix usage of deprecated function
Marc-André Lureau [Tue, 25 Apr 2023 12:27:40 +0000 (16:27 +0400)]
gtk/win32: fix usage of deprecated function

[106/939] Compiling C object gtk/libgtk.a.p/gtkimcontextime.c.obj
../gtk/gtkimcontextime.c: In function 'gtk_im_context_ime_set_preedit_font':
../gtk/gtkimcontextime.c:780:3: warning: 'gtk_widget_get_style_context' is deprecated [-Wdeprecated-declarations]
  780 |   font_desc = gtk_css_style_get_pango_font (gtk_style_context_lookup_style (gtk_widget_get_style_context (context_ime->client_widget)));

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2 years agogdk/win32: fix defined but not used warnings
Marc-André Lureau [Tue, 25 Apr 2023 12:22:34 +0000 (16:22 +0400)]
gdk/win32: fix defined but not used warnings

[30/1038] Compiling C object gdk/win32/libgdk-win32.a.p/gdkmain-win32.c.obj
../gdk/win32/gdkmain-win32.c:146:1: warning: 'gdk_win32_finalize_ole' defined but not used [-Wunused-function]
  146 | gdk_win32_finalize_ole (void)
      | ^~~~~~~~~~~~~~~~~~~~~~
../gdk/win32/gdkmain-win32.c:113:1: warning: 'gdk_win32_finalize_com' defined but not used [-Wunused-function]
  113 | gdk_win32_finalize_com (void)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2 years agogdk/win32: fix `hr` set but not used
Marc-André Lureau [Tue, 25 Apr 2023 12:18:26 +0000 (16:18 +0400)]
gdk/win32: fix `hr` set but not used

A number of warnings are produced:

[23/1038] Compiling C object gdk/win32/libgdk-win32.a.p/gdkinput-dmanipulation.c.obj
../gdk/win32/gdkinput-dmanipulation.c: In function 'reset_viewport':
../gdk/win32/gdkinput-dmanipulation.c:354:11: warning: variable 'hr' set but not used [-Wunused-but-set-variable]
  354 |   HRESULT hr;
      |           ^~

Try to do something sensible instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2 years agogdk/win32: fix g_string_free warning
Marc-André Lureau [Tue, 25 Apr 2023 12:14:55 +0000 (16:14 +0400)]
gdk/win32: fix g_string_free warning

../gdk/win32/gdkclipdrop-win32.c: In function 'transmute_cf_shell_id_list_to_text_uri_list':
C:/msys64/ucrt64/include/glib-2.0/glib/gstring.h:72:5: warning: ignoring return value of 'g_string_free_and_steal' declared with attribute 'warn_unused_result' [-Wunused-result]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2 years agogdk/win32: fix GDK_NOTE redefined warning
Marc-André Lureau [Tue, 25 Apr 2023 12:11:03 +0000 (16:11 +0400)]
gdk/win32: fix GDK_NOTE redefined warning

In file included from ../gdk/win32/gdkdrag-win32.c:201:
../gdk/win32/gdkprivate-win32.h:45: warning: "GDK_NOTE" redefined
   45 | #define GDK_NOTE(type,action)                             \
      |
../gdk/win32/gdkdrag-win32.c:40: note: this is the location of the previous definition
   40 | #define GDK_NOTE(a,b)

Fixes: bc159207bd0 ("gdk: Drop old debug macros")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2 years agogsk: Don't misuse bitwise operators
Matthias Clasen [Tue, 25 Apr 2023 11:30:09 +0000 (13:30 +0200)]
gsk: Don't misuse bitwise operators

We should use || for booleans, not |=.

2 years agoMerge branch 'label_get_active_uri' into 'main'
Matthias Clasen [Tue, 25 Apr 2023 11:22:34 +0000 (11:22 +0000)]
Merge branch 'label_get_active_uri' into 'main'

Fix hovered link URI not returned by gtk_label_get_current_uri

See merge request GNOME/gtk!5864

2 years agoMerge branch 'icontheme-has-icon-consistency' into 'main'
Matthias Clasen [Tue, 25 Apr 2023 07:49:12 +0000 (07:49 +0000)]
Merge branch 'icontheme-has-icon-consistency' into 'main'

icontheme: make has_(g)icon consistent with lookup

Closes #5709

See merge request GNOME/gtk!5865

2 years agoMerge branch 'null-display' into 'main'
Matthias Clasen [Tue, 25 Apr 2023 07:46:21 +0000 (07:46 +0000)]
Merge branch 'null-display' into 'main'

gdkdisplaymanager: Add missing nullable to display name

See merge request GNOME/gtk!5866

2 years agogdkdisplaymanager: Add missing nullable to display name
Takao Fujiwara [Tue, 25 Apr 2023 03:08:08 +0000 (12:08 +0900)]
gdkdisplaymanager: Add missing nullable to display name

2 years agoicontheme: make has_(g)icon consistent with lookup
velsinki [Mon, 24 Apr 2023 21:38:20 +0000 (23:38 +0200)]
icontheme: make has_(g)icon consistent with lookup

Make `gtk_icon_theme_has_icon` and `gtk_icon_theme_has_gicon` also
consider unthemed icons. This makes their behavior consistent with the
actual (documented) lookup behavior.

Fixes: #5709 and makes the workaround in nautilus@b643a00b obsolete
2 years agoFix hovered link URI not returned by gtk_label_get_current_uri
Chris Mayo [Mon, 24 Apr 2023 18:35:47 +0000 (19:35 +0100)]
Fix hovered link URI not returned by gtk_label_get_current_uri

This is needed for a query-tooltip handler, as mentioned in the
documentation, when there has been a hover timeout.

Maintain the previous behaviour when the link is clicked and follow the
existing documentation regarding selectable labels.

A notify::cursor handler can now also be used to retrieve the URI of the
link under the cursor.

2 years agoMerge branch 'ebassi/button-can-shrink' into 'main'
Matthias Clasen [Mon, 24 Apr 2023 12:28:12 +0000 (12:28 +0000)]
Merge branch 'ebassi/button-can-shrink' into 'main'

Add GtkButton:can-shrink

See merge request GNOME/gtk!5552

2 years agoAdd GtkMenuButton:can-shrink
Emmanuele Bassi [Fri, 14 Apr 2023 12:08:13 +0000 (13:08 +0100)]
Add GtkMenuButton:can-shrink

Map the GtkMenuButton property to the underlying GtkButton widget.

2 years agoUpdate Turkish translation
Sabri Ünal [Sun, 23 Apr 2023 21:12:44 +0000 (21:12 +0000)]
Update Turkish translation

2 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Sat, 22 Apr 2023 15:10:02 +0000 (15:10 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

surface: Clean up drawing code

See merge request GNOME/gtk!5861

2 years agosurface: reformat function
Benjamin Otte [Sat, 22 Apr 2023 14:35:16 +0000 (16:35 +0200)]
surface: reformat function

Make the function follow usual coding conventions.

And while doing that, remove duplicate functionality.

2 years agosurface: Refactor code
Benjamin Otte [Sat, 22 Apr 2023 14:33:35 +0000 (16:33 +0200)]
surface: Refactor code

Move the early exit conditions to the top and turn them into early exits
instead of nesting if statements.

2 years agosurface: Fold function into its only caller
Benjamin Otte [Sat, 22 Apr 2023 14:29:58 +0000 (16:29 +0200)]
surface: Fold function into its only caller

No other changes

2 years agosurface: Stop maintaining an unused linked list
Benjamin Otte [Sat, 22 Apr 2023 14:27:27 +0000 (16:27 +0200)]
surface: Stop maintaining an unused linked list

wat?

2 years agosurface: Remove in_update tracking
Benjamin Otte [Sat, 22 Apr 2023 14:24:16 +0000 (16:24 +0200)]
surface: Remove in_update tracking

It's 2023, we use frame clocks now and don't have nested surface drawing
anymore.

2 years agosurface: Stop tracking the active update area
Benjamin Otte [Sat, 22 Apr 2023 14:10:24 +0000 (16:10 +0200)]
surface: Stop tracking the active update area

It's unused.

2 years agoUpdate Russian translation
Aleksandr Melman [Sat, 22 Apr 2023 12:03:07 +0000 (12:03 +0000)]
Update Russian translation

2 years agoUpdate Polish translation
Piotr Drąg [Sat, 22 Apr 2023 09:16:08 +0000 (11:16 +0200)]
Update Polish translation

2 years agoMerge branch 'gtkfilesystemmodel-emit-items-changed-on-modifying-attributes' into...
Matthias Clasen [Sat, 22 Apr 2023 05:54:58 +0000 (05:54 +0000)]
Merge branch 'gtkfilesystemmodel-emit-items-changed-on-modifying-attributes' into 'main'

filesystemmodel: Emit items-changed when modifying attributes

Closes #5758

See merge request GNOME/gtk!5853

2 years agofilesystemmodel: Emit items-changed when modifying attributes
Olivier Crête [Sat, 22 Apr 2023 05:54:57 +0000 (05:54 +0000)]
filesystemmodel: Emit items-changed when modifying attributes